﻿namespace WorldOfMUDra.WorldObjectClasses
{
    public class Sign: XmlLoadedItem
    {
        readonly string _text;
        public string Text
        {
            get { return _text; }
        }

        public Sign(string fname) 
            : base(fname)
        {
            if (Tags.ContainsKey("text")) { _text = Tags["text"]; }
        }

        public override void OnFirstPickUp(Player p)
        {

        }

        public override void OnPickUp(Player p)
        {

        }

        public override void OnLook(Player looker)
        {
            looker.SendWorldMessage("It says \""+_text+"\"");
        }
    }
}
